home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gekikoh Dennoh Club 1
/
Gekikoh Dennoh Club Vol. 1 (Japan).7z
/
Gekikoh Dennoh Club Vol. 1 (Japan) (Track 1).bin
/
tools
/
xb
/
fncsrc
/
iocsfnc.has
< prev
next >
Wrap
Text File
|
1995-06-13
|
4KB
|
254 lines
.include doscall.mac
.include iocscall.mac
.include fefunc.h
.include fdef.h
.text
.even
.dc.l ret
.dc.l ret
.dc.l ret
.dc.l ret
.dc.l ret
.dc.l ret
.dc.l ret
.dc.l ret
.dc.l ptr_token
.dc.l ptr_param
.dc.l ptr_exec
.dc.l 0,0,0,0,0
ret:
rts
ptr_token:
.dc.b 'bpeek',0
.dc.b 'wpeek',0
.dc.b 'lpeek',0
.dc.b 'bpoke',0
.dc.b 'wpoke',0
.dc.b 'lpoke',0
.dc.b 'iocs',0
.dc.b '_arp',0
.dc.b '_vrp',0
.dc.b 0
.even
ptr_param:
.dc.l p_bpeek
.dc.l p_wpeek
.dc.l p_lpeek
.dc.l p_bpoke
.dc.l p_wpoke
.dc.l p_lpoke
.dc.l p_iocs
.dc.l p_arp
.dc.l p_vrp
ptr_exec:
.dc.l e_bpeek
.dc.l e_wpeek
.dc.l e_lpeek
.dc.l e_bpoke
.dc.l e_wpoke
.dc.l e_lpoke
.dc.l e_iocs
.dc.l e_arp
.dc.l e_vrp
p_bpeek:
p_wpeek:
p_lpeek:
.dc.w int_val
.dc.w int_ret
p_bpoke:
p_wpoke:
p_lpoke:
.dc.w int_val * adr
.dc.w int_val * var1
.dc.w int_omt
.dc.w int_omt
.dc.w int_omt
.dc.w int_omt
.dc.w int_omt
.dc.w int_omt
.dc.w int_omt
.dc.w int_omt * var9
.dc.w void_ret
p_iocs:
.dc.w int_val * d0
.dc.w int_omt * d1
.dc.w int_omt * d2
.dc.w int_omt * d3
.dc.w int_omt * d4
.dc.w int_omt * d5
.dc.w $00ff * a1 (省略可能な 1 or 2 次元の全ての型の配列)
.dc.w $00ff * a2
.dc.w int_ret
p_arp:
.dc.w $007f * 1 or 2 次元の全ての型の配列
.dc.w int_ret * address
p_vrp:
.dc.w $001f * 全ての型の変数のポインタ
.dc.w int_ret * address
e_iocs:
move.l par1+6(sp),d0 * IOCS CALL NUMBER
move.l par2+6(sp),d1
move.l par3+6(sp),d2
move.l par4+6(sp),d3
move.l par5+6(sp),d4
move.l par6+6(sp),d5
lea.l par7(sp),a0
bsr dim_data
movea.l a2,a1
addq.l #8,a0 * par8
bsr dim_data
trap #$f
bra return_d0
dim_data:
tst.w (a0)+
bmi 2f
movea.l 4(a0),a2
move.w 4(a2),d7 * 次元 - 1 = 0,1
beq 1f
addq.l #6,a2 * 2-dim
1:
lea.l 10(a2),a2
2:
rts
e_arp:
movea.l par1+6(sp),a0 * 1 or 2 次元の全ての型の配列
move.w 4(a0),d0 * 次元
beq @f
addq.l #6,a0
@@:
lea.l 10(a0),a0
move.l a0,d0 * データ領域の先頭
bra return_d0
e_vrp:
move.l par1+6(sp),d0 * 全ての型の変数のポインタ
bra return_d0
e_bpeek:
movea.l par1+6(sp),a1
moveq #0,d0
move.b #_B_BPEEK,d0
trap #$f
bra return_d0
e_wpeek:
movea.l par1+6(sp),a1
bsr parity_check
moveq #0,d0
move.b #_B_WPEEK,d0
trap #$f
bra return_d0
e_lpeek:
movea.l par1+6(sp),a1
bsr parity_check
IOCS _B_LPEEK
bra return_d0
e_bpoke:
movea.l par1+6(sp),a1
lea.l par2(sp),a0
moveq #9-1,d2
@@:
tst.w (a0)+
bmi 1f
move.b 7(a0),d1
IOCS _B_BPOKE
bra 2f
1:
addq.l #1,a1
2:
addq.l #8,a0
dbra d2,@b
bra return_zero
e_wpoke:
movea.l par1+6(sp),a1
bsr parity_check
lea.l par2(sp),a0
moveq #9-1,d2
@@:
tst.w (a0)+
bmi 1f
move.w 6(a0),d1
IOCS _B_WPOKE
bra 2f
1:
addq.l #2,a1
2:
addq.l #8,a0
dbra d2,@b
bra return_zero
e_lpoke:
movea.l par1+6(sp),a1
bsr parity_check
lea.l par2(sp),a0
moveq #9-1,d2
@@:
tst.w (a0)+
bmi 1f
move.l 4(a0),d1
IOCS _B_LPOKE
bra 2f
1:
addq.l #4,a1
2:
addq.l #8,a0
dbra d2,@b
bra return_zero
parity_check:
move.l a1,d0
btst #0,d0
bne @f
rts
@@:
addq.l #4,sp
lea.l odd_adr(pc),a1
moveq #1,d0
rts
odd_adr:
.dc.b '奇数アドレスを指定しました',0
.even
** ** ** ** ** ** ** ** ** **
return_zero:
moveq.l #0,d0
return_d0:
lea.l fac(pc),a0
move.l d0,6(a0)
moveq.l #0,d0
rts
.even
fac:
.dc.w 0
.dc.l 0
.dc.l 0
.end